A toolkit for static analysis of constraint logic programs
نویسنده
چکیده
Generic systems for the analysis of logic programs have been proposed over the last decade or so. Considerable progress has been made in terms of frameworks, algorithms, abstract domains and implementations. A number of generic top-down procedural frameworks are widely available. However, implementation e orts for bottom-up declarative frameworks are in a preliminary stage. In this thesis we design and implement a program analysis framework for (constraint) logic programs. Our aim is to build a general purpose, versatile toolkit which is simple, practical and exible, and provides reasonably precise approximations, as well as allowing complex analyses to be constructed for proving program properties. This is done by providing a set of general approximation techniques parameterised by a property of interest, which is de ned using pre-interpretations. Abstract compilation is used to incorporate properties into the program to be analysed. Then a bottom-up xpoint computation of an immediate consequences operator is performed. Goal dependent analyses are realised through a set of query-answer transformation options. Our framework is based on declarative semantics, in particular on the standard logical notions of interpretation, model and logical consequence, and avoids the classical complex procedural ingredients used in other frameworks. Constraint logic programming is used as a meta-languge to express properties of terms. A pre-interpretation is a CLP program with arbitrary complexity. We present the framework, introduce the components, options and combinations of the components, provide a guide for using the toolkit, and demonstrate a number of applications using the framework.
منابع مشابه
Set-based Error Diagnosis of Concurrent Constraint Programs
We present an automated method for the static prediction of the runtime error`deadlock or failure' in concurrent constraint programs. Operationally, the method is based on a new set-based analysis of reactive logic programs which computes an approximation of the greatest-model semantics. Semantically , the method is based on the connection between the inevitability of`deadlock or failure' in co...
متن کاملA non-termination criterion for binary constraint logic programs
On the one hand, termination analysis of logic programs is now a fairly established research topic within the logic programming community. On the other hand, non-termination analysis seems to remain a much less attractive subject. If we divide this line of research into two kinds of approaches: dynamic versus static analysis, this paper belongs to the latter. It proposes a criterion for detecti...
متن کاملSlicing of Constraint Logic Programs
Abstract. Slicing is a program analysis technique originally developed for imperative languages. It facilitates understanding of data flow and debugging. This paper discusses slicing of Constraint Logic Programs. Constraint Logic Programming (CLP) is an emerging software technology with a growing number of applications. Data flow in constraint programs is not explicit, and for this reason the c...
متن کاملAn Improved Non-Termination Criterion for Binary Constraint Logic Programs
On one hand, termination analysis of logic programs is now a fairly established research topic within the logic programming community. On the other hand, non-termination analysis seems to remain a much less attractive subject. If we divide this line of research into two kinds of approaches: dynamic versus static analysis, this paper belongs to the latter. It proposes a criterion for detecting n...
متن کاملAnalysis of Imperative Programs through Analysis of Constraint Logic Programs
In this paper a method is proposed for carrying out analysis of imperative programs. We achieve this by writing down the language semantics as a declarative program (a constraint logic program, in the approach shown here). We propose an e ective style of writing operational semantics suitable for analysis which we call one-state small-step semantics. Through controlled partial evaluation we are...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 1998